/*
 * Licensed Materials - Property of tenxcloud.com
 * (C) Copyright 2018 TenxCloud. All Rights Reserved.
 * 2018-06-13  @author lizhen
 */

package composite

import (
	jsoniter "github.com/json-iterator/go"
	"modules.tenxcloud.com/common/contract"
	"modules.tenxcloud.com/common/utility"
	"modules.tenxcloud.com/common/utility/crypto"
	"modules.tenxcloud.com/common/utility/jwt"
	"modules.tenxcloud.com/common/utility/oidc"
)

var (
	JSON = jsoniter.ConfigCompatibleWithStandardLibrary

	Configuration    contract.Configuration = utility.NewBaseConfig()
	Database         contract.Database      = utility.NewDatabase(Configuration)
	Pool             contract.Pool          = utility.NewPool(100) // TODO: use configuration
	LoginInfoCryptor                        = crypto.NewAEADCryptor(Configuration)
	JWTAuthorizer                           = jwt.NewJWTAuthorizer(Configuration, LoginInfoCryptor)
	OIDCAuthorizer                          = oidc.NewOIDCAuthorizer()
)
